<?php
ini_set('date.timezone','asia/shanghai');

/*******************************************************************/
/*                    Unmodifiable configuration                   */
/*           Do not Modify any configuration of this section       */
/*******************************************************************/
define('AREA_ID', intval($argv[1])?intval($argv[1]):1);

define('CONNECTOIN_MSG_ID', 1000000 + AREA_ID );//c=>php: Someone connect in or disconnect
define('DATA_MSG_ID', 2000000 + AREA_ID );//c=>php Someone sent some datas
define('DOWN_S_MSG_ID', 4000000 + AREA_ID );//php=>c Message sent to c by php for only one client fd
define('DOWN_M_MSG_ID', 5000000 + AREA_ID );//php=>c Messages sent to c by php for only many client fd

define('SEND_ALL_FD_VALUE', 147483648);//Send message to all clients
define('SEND_SPE_FD_VALUE', 147483647);//Send different messages to different clients
define('KICK_USER_FD_VALUE', 147483646);//Kick a user
define('BLOCK_IP_FD_VALUE', 147483645);//Add a prohibited connection ip, enbale --block_ip to take effect.
define('LINK_IN_MSG',chr(1));
define('LINK_OUT_MSG',chr(2));
define('PHP_DMSG_SPLIIER', chr(11));

//The above configuration corresponding configuration in c, it can not be amended
//Unmodifiable configuration END

/*******************************************************************/
/*                       Other configuration                       */
/*******************************************************************/
define('MAP_MSG_ID', 3000000 + AREA_ID );//php=>php 登录注册成功之后，跳转，php之间的消息
define('LOGIN_REG_MSG_ID', 6000000 + AREA_ID );//php=>php 注册登录
define('DIS_DATA_MSG_ID', 7000000 + AREA_ID );//php=>php 上行分发数据
define('base_path' , dirname(dirname(__FILE__)));
define('lib_path' , dirname(dirname(__FILE__)).'/lib');

$db_config = array('127.0.0.1','root','123qwe','event2game');
